Imports System.Runtime.Serialization
Imports System.Reflection

''' <summary>
''' 
''' </summary>
''' <remarks></remarks>
<Serializable()> _
 Public Class MessageClass

    Public Enum MsgSenderType
        CLIENT
        SERVER
    End Enum

    Private mMessageID As System.Guid
    Private mMessageType As String
    Private mMessageText As String
    Private mMessageSender As String
    Private mMessageSenderType As MsgSenderType
    Private mPayload As Object

    Public Sub New()
        Me.MessageSenderType = MsgSenderType.SERVER
    End Sub

    Public Sub New(ByVal MessageId As System.Guid, ByVal MessageType As String, ByVal MessageText As String, ByVal MessageSender As String, ByVal Payload As Object)
        Me.MessageID = MessageId
        Me.MessageType = MessageType
        Me.MessageText = MessageText
        Me.MessageSender = MessageSender
        Me.MessageSenderType = MsgSenderType.SERVER
        Me.Payload = Payload
    End Sub

    Public Property MessageID() As System.Guid
        Get
            Return mMessageID

        End Get
        Set(ByVal Value As System.Guid)
            mMessageID = Value

        End Set
    End Property

    Public Property MessageSender() As String
        Get
            Return mMessageSender

        End Get
        Set(ByVal Value As String)
            mMessageSender = Value

        End Set
    End Property

    Public Property MessageSenderType() As MsgSenderType
        Get
            Return mMessageSenderType
        End Get
        Set(ByVal value As MsgSenderType)
            mMessageSenderType = value
        End Set
    End Property

    Public Property MessageText() As String
        Get
            Return mMessageText
        End Get
        Set(ByVal Value As String)
            mMessageText = Value


        End Set
    End Property

    Public Property MessageType() As String
        Get
            Return mMessageType
        End Get
        Set(ByVal Value As String)
            mMessageType = Value

        End Set
    End Property


    Public Property Payload() As Object
        Get
            Return mPayload
        End Get
        Set(ByVal Value As Object)
            mPayload = Value
        End Set
    End Property
End Class

